/*
 * These files are distributed under the terms of the GNU GPLv2, the GNU General
 * Public version 2. See LICENSE.txt
 */
package fileCommodore.plugin.pathCloner;

import java.awt.event.*;

import org.apache.commons.vfs.*;

import fileCommodore.plugin.*;

/**
 * @author nado18@gmail.com, on Aug 3, 2007
 */
public class PathClonerPlugin extends Plugin
{
	
	/*
	 * (non-Javadoc)
	 * 
	 * @see fileCommodore.plugin.Plugin#activeSelectionChanged()
	 */
	@Override
	public void activeSelectionChanged()
	{
		// TODO Auto-generated method stub
		
	}
	
	/*
	 * (non-Javadoc)
	 * 
	 * @see fileCommodore.plugin.Plugin#handle(java.awt.event.KeyEvent)
	 */
	@Override
	public void handle( KeyEvent ev )
	{
		if (isCtrlDown( ev ) && KeyEvent.VK_PERIOD == ev.getKeyCode())
		{
			try
			{
				changeActiveTo( getInactiveSelection().getCurrent().getFileObject() );
			}
			catch (FileSystemException e)
			{
				showError(
					"Path Cloner Error",
					"Could not clone the other pane's path.",
					e );
			}
		}
	}
	
	/*
	 * (non-Javadoc)
	 * 
	 * @see fileCommodore.plugin.Plugin#inactiveSelectionChanged()
	 */
	@Override
	public void inactiveSelectionChanged()
	{
		// TODO Auto-generated method stub
		
	}
	
}
